import type { NvCrudOption } from '../types'
import type { NvFormInst, NvFormMode } from '@/form/types'
import type { RowData, Size } from '@/types'

export type FormDone = (close?: boolean) => void

export interface Props {
  option: NvCrudOption
  formMode: NvFormMode
  size: Size
}
export interface Emits {
  (e: 'row-save', data: RowData, done: FormDone): void
  (e: 'row-update', data: RowData, done: FormDone): void
}

export interface Expose extends NvFormInst {
  openForm: () => Promise<void>
  closeForm: () => Promise<void>
}
